package org.tigr.htc.cmd;

/*
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

import java.net.UnknownHostException;
import java.util.Date;

import org.tigr.antware.shared.command.events.SubmitEvent;

/**
 * The <b>TkSubmitEvent</b> class extends CommandEvent and is created and
 * sent to registered command listeners when a Command object is 
 * submitted to be executed. 
 *
 */

public class TkSubmitEvent extends SubmitEvent {

	private static final long serialVersionUID = 4740370040476283519L;
	protected int index;

    /**
     * Creates a new <code>SubmitEvent</code> instance. 
     */
    public TkSubmitEvent() {
        super();
    }

    /**
     * Creates a new <code>TkSubmitEvent</code> instance.
     * 
     * @param pSource 
     * @param pCommandID
     * @param pDate
     * @param pMessage
     * @param pMachine
     * @param pUser
     */
    public TkSubmitEvent(Object pSource, long pCommandID, Date pDate, 
		       String pMessage, String pMachine, String pUser, String pLogLocation, int pIndex) {
        super(pSource, pCommandID, pDate, pMessage, pMachine, pUser, pLogLocation);
        index = pIndex;
    }

    /**
     * The constructor <code>TkSubmitEvent</code> creates a new instance
     * 
     * @param pSource
     * @param pCommandID
     * @param pDate
     * @param pMessage
     * @throws UnknownHostException
     */
    public TkSubmitEvent(Object pSource, long pCommandID, Date pDate, 
		       String pMessage, int pIndex) throws UnknownHostException {
        super(pSource, pCommandID, pDate, pMessage);
        index = pIndex;
    }

    /**
     * @return
     */
    public int getIndex() {
        return index;
    }

    /**
     * @param pIndex
     */
    public void setIndex(int pIndex) {
        index = pIndex;
    }
}


